//
//  ViewController.m
//  TTT
//
//  Created by chun on 2018/5/22.
//  Copyright © 2018年 JC. All rights reserved.
//

#import "ViewController.h"
//#import "ViewController+hook.h"


@interface ViewController ()
@property (nonatomic, strong) UIButton *commitButton;
@end

@implementation ViewController


- (void)viewDidLoad {
    [super viewDidLoad];

    [self commitButton];
    
}

- (UIButton *)commitButton {
    if (!_commitButton) {
        _commitButton = [[UIButton alloc] init];
        [self.view addSubview:_commitButton];
        [_commitButton setTitle:@"提交" forState:UIControlStateNormal];
        [_commitButton setBackgroundColor:[UIColor blackColor]];
        [_commitButton.titleLabel setFont:[UIFont systemFontOfSize:19]];
        [_commitButton.layer setCornerRadius:4.0f];
        [_commitButton.layer setShadowOffset:CGSizeMake(3.5, 3.5)];
        [_commitButton setFrame:CGRectMake(100, 100, 100, 100)];
        [_commitButton addTarget:self action:@selector(clickCommitButton:) forControlEvents:UIControlEventTouchUpInside];
    }
    
    return _commitButton;
}

- (void)clickCommitButton:(UIButton *)sender {
    if (sender) {
        NSLog(@"[++++[  ]++++]");
    }
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
